module.exports = function($scope, $state, $stateParams, $modalInstance, items, $resource){

    $scope.abc=items;
    $scope.cancel = function () {  
//         $modalInstance.dismiss('cancel'); 
         $modalInstance.close($scope.result);
    };
    $scope.gogogo = function () {
        items['product_id']=items.id;
        $resource('/api/ac/lc/productService/saveCopyInfo', {}, {}).save(items, function(res){
            if(res.errcode === 0){
                $modalInstance.close($scope.result);
                alert('复制成功:'+'产品编号为'+res.data.product_id);
            }else{
                alert(res.errmsg);
            }
        });
    };
};